/**
 * @file mmgr_sim.c
 * @brief 
 * @author  ()
 * @version 1.0
 * @date 2024-10-11
 * 
 * @copyright Copyright (C) 2019 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-10-11 <td>1.0     <td>     <td>内容
 * </table>
 */
#include "include/mmgr_log.h"
#include "include/mmgr_sim.h"


bool sim_status_change = 0;
bool is_no_sim_card = 0;


/**
 * @brief 设置SIM卡掉卡状态
 * @param  status           My Param doc
 */
void mmgr_simcard_set_lost(bool lost_status)
{
	is_no_sim_card = lost_status;
	sim_status_change = true;
}

/**
 * @brief 查询SIM卡状态
 * @return MMGR_SIM_STATUS 
 */
MMGR_SIM_STATUS mmgr_simcard_status_get(void)
{
    if(!sim_status_change){
        return MMGR_SIM_UNKNOWN;
    }
	
    if(is_no_sim_card){
        return MMGR_SIM_LOST;
    }else{
        return MMGR_SIM_OK;
    }
}
